package com.topnet.leaderhelp.utils.xfyun.msc.ui;

import android.app.Dialog;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;

/**
 * @Description: java类作用描述
 * @Author: 下雨了
 * @CreateDate: 2022-03-03 15:04
 * @UpdateUser: 更新者
 * @UpdateDate: 2022-03-03 15:04
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
public class CDialog extends Dialog {

    private DLinearLayout linearLayout;
    private CCallBack callBack;

    public CDialog(Context context) {
        super(context);
        linearLayout = new DLinearLayout(context);
        callBack = this::dismiss;
    }

    protected void onCreate(Bundle var1) {
        super.onCreate(var1);
        this.requestWindowFeature(1);
        this.setContentView(this.linearLayout);
        this.getWindow().setBackgroundDrawable(new ColorDrawable(0));
    }

    public void show() {
        this.setCanceledOnTouchOutside(true);
        linearLayout.setExitCallBack(callBack);
        linearLayout.e();
        super.show();
    }

    public void dismiss() {
        linearLayout.a();
        super.dismiss();
    }

    public boolean destroy() {
        if (this.isShowing()) {
            return false;
        } else {
            boolean var10000 = linearLayout.b();
            linearLayout = null;
            return var10000;
        }
    }

    public interface CCallBack {
        void callBack();
    }
}
